Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snowflake] test types for unit testing #896

Merged
merged 13 commits into from
Feb 9, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Feb 1, 2024

resolves #898
resolves #891
docs dbt-labs/docs.getdbt.com/#

Problem

Solution

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@MichelleArk MichelleArk requested a review from a team as a code owner February 1, 2024 18:01
@cla-bot cla-bot bot added the cla:yes label Feb 1, 2024
Copy link
Contributor

github-actions bot commented Feb 1, 2024

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-snowflake contributing guide.

@MichelleArk MichelleArk changed the title first pass: test unit testing on snowflake [Snowflake] test types for unit testing Feb 1, 2024
@mikealfare mikealfare added the Skip Changelog Skips GHA to check for changelog file label Feb 1, 2024
@mikealfare
Copy link
Contributor

The two unrelated, failed test cases on the dbt version was an issue in dbt-tests-adapter which has since been resolved. However it looks like a relevant test case is failing as well.

Copy link
Contributor

@jtcohen6 jtcohen6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on some quick local testing 🎩 with this branch, I think we need to incorporate some of the logic from #839 for the unstructed (variant/array/object) types — but I could be mistaken! (especially since I'm having trouble running the adapter functional tests locally)

That PR also included an update that mapped FIXEDNUMERIC types. I don't remember exactly why it was needed for unit tests, but it did have the nice side-effect of a clearer error message for model contract type mismatches.

dbt/include/snowflake/macros/utils/safe_cast.sql Outdated Show resolved Hide resolved
@mikealfare mikealfare removed the Skip Changelog Skips GHA to check for changelog file label Feb 5, 2024
dev-requirements.txt Outdated Show resolved Hide resolved
@mikealfare mikealfare merged commit d01d63c into main Feb 9, 2024
14 checks passed
@mikealfare mikealfare deleted the TestSnowflakeUnitTestingTypes branch February 9, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants